package com.amazon.trietree.server;

import com.amazon.trietree.db.PostgreUtils;

/**
 * Created with IntelliJ IDEA.
 * User: Tylaar
 * Date: 11/9/12
 * Time: 11:11 AM
 * Company: Amazon.com
 */
public class MetaDataServerID {
    private String personalID;
    private PostgreUtils postgreUtils;

    public MetaDataServerID(){
        personalID = postgreUtils.getNextVal().toString();
    }

    public String getPersonalID() {
        return personalID;
    }
    public PostgreUtils getPostgreUtils() {
        return postgreUtils;
    }

    public void setPostgreUtils(PostgreUtils postgreUtils) {
        this.postgreUtils = postgreUtils;
    }

    public void destroy()throws Exception{
        postgreUtils.closeConnection();
    }
}
